<template>
	<el-table :data="tableData" style="width: 100%" class="person-rec-spot-current-table">
		<el-table-column prop="date" label="日期" />
		<el-table-column prop="coin" label="交易对">
			<template #default="scope">
				<div class="text-12px flex items-center pt-10px pb-10px">
					<span>{{ scope.row.coin }}</span>
					<el-icon class="ml-6px w-10px h-10px">
						<ArrowRight />
					</el-icon>
				</div>
			</template>
		</el-table-column>
		<el-table-column prop="methods" label="类型">
		</el-table-column>
		<el-table-column prop="to" label="方向">
			<template #default="scope">
				<div>
					<span class="text-#07B175" v-if="scope.row.to == '买'">{{ scope.row.to }}</span>
					<span class="text-#F34E5F" v-if="scope.row.to == '卖'">{{ scope.row.to }}</span>
				</div>
			</template>
		</el-table-column>
		<el-table-column prop="price" label="委托价格" />
		<el-table-column prop="account" label="委托数量" />
		<el-table-column prop="trade" label="成交数量">
			<template #default="scope">
				<div>
					<span v-if="scope.row.trade">
						{{ scope.row.trade }}
					</span>
					<span v-else>
						--
					</span>
				</div>
			</template>
		</el-table-column>
		<el-table-column prop="sum" label="金额" />
		<el-table-column label="全撤" align="right">
			<template #header>
				<div>
					<span class="text-#114CEE">全撤</span>
				</div>
			</template>
			<template #default="scope">
				<div class="cursor-pointer">
					<img src="/transaction/spot/delete.svg" alt="" class="w-14px h-14px">
				</div>
			</template>
		</el-table-column>
	</el-table>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const tableData = ref<any[]>([
	{
		date: "04-02 12:00:30",
		coin: "BTC/USDT",
		methods: "限价委托",
		to: '买',
		price: '323.30',
		account: '500.00',
		trade: '',
		sum: "2.60 USDT"
	},
	{
		date: "04-02 12:00:30",
		coin: "BTC/USDT",
		methods: "限价委托",
		to: '买',
		price: '323.30',
		account: '500.00',
		trade: '500.00',
		sum: "2.60 USDT"
	},
	{
		date: "04-02 12:00:30",
		coin: "BTC/USDT",
		methods: "限价委托",
		to: '卖',
		price: '323.30',
		account: '500.00',
		trade: '500.00',
		sum: "2.60 USDT"
	}
])

</script>
<style lang="scss" scoped>
.person-rec-spot-current-table {
	font-size: 12px;
}
</style>
